package com.goldcn.sys.dao;

import com.goldcn.sys.model.GcnSysUserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface GcnSysUserRoleMapper {
    int deleteByPrimaryKey(String ID);

    int insert(GcnSysUserRole record);

    int insertSelective(GcnSysUserRole record);

    GcnSysUserRole selectByPrimaryKey(String ID);

    int updateByPrimaryKeySelective(GcnSysUserRole record);

    int updateByPrimaryKey(GcnSysUserRole record);

	int selectPageNumByCondition(@Param(value = "condition") String condition);

	/**
	 * 删除所有角色关联用户
	 */
	int deleteByRoleId(String roleID);

    List<Map<String ,Object>> getUserRole(@Param(value = "userID") String userID);

    void deleteByUserID(@Param(value = "userID") String userID);

    GcnSysUserRole selectByUserIDAndRoleID(Map<String, Object> map);

    List<String> getUserRoleIds(@Param(value = "userID") String userID);


}